package compareDatabase;

public class TableColumns {
    private String COLUMN_NAME;
    private String DATA_TYPE;
    private String DATA_LENGTH;


    public String getCOLUMN_NAME() {
        return COLUMN_NAME;
    }

    public void setCOLUMN_NAME(String COLUMN_NAME) {
        this.COLUMN_NAME = COLUMN_NAME;
    }

    public String getDATA_TYPE() {
        return DATA_TYPE;
    }

    public void setDATA_TYPE(String DATA_TYPE) {
        this.DATA_TYPE = DATA_TYPE;
    }

    public String getDATA_LENGTH() {
        return DATA_LENGTH;
    }

    public void setDATA_LENGTH(String DATA_LENGTH) {
        this.DATA_LENGTH = DATA_LENGTH;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof TableColumns)) return false;

        TableColumns that = (TableColumns) o;

        if (getCOLUMN_NAME() != null ? !getCOLUMN_NAME().equals(that.getCOLUMN_NAME()) : that.getCOLUMN_NAME() != null)
            return false;
        if (getDATA_TYPE() != null ? !getDATA_TYPE().equals(that.getDATA_TYPE()) : that.getDATA_TYPE() != null)
            return false;
        return getDATA_LENGTH() != null ? getDATA_LENGTH().equals(that.getDATA_LENGTH()) : that.getDATA_LENGTH() == null;
    }

    @Override
    public int hashCode() {
        int result = getCOLUMN_NAME() != null ? getCOLUMN_NAME().hashCode() : 0;
        result = 31 * result + (getDATA_TYPE() != null ? getDATA_TYPE().hashCode() : 0);
        result = 31 * result + (getDATA_LENGTH() != null ? getDATA_LENGTH().hashCode() : 0);
        return result;
    }
}
